package com.xuan.common.core.constants;

public interface CacheConstants {

    String LOGIN_TOKEN_KEY = "loginToken:";     // userKey 前缀

    Long EXP = 3L;    // 缓存过期时间

    Long USER_CONTEST_EXP = 6L;

    Long REFRESH_TIME = 3L;    // token 续期时间

    Long USER_EXP = 10L;

    String PHONE_CODE_KEY = "p:c:";         // phone:code:手机号     value:短信验证码

    String CODE_TIMES_KEY = "c:t:";         // code:times:手机号     value:今日已获取次数

    String CONTEST_HISTORY_LIST_KEY = "c:h:l";     // contest:history:list   value: 竞赛id

    String CONTEST_UNFINISHED_LIST_KEY = "c:t:l";       // contest:times:list   value: 竞赛id      times代表离结束还有剩余时间

    String CONTEST_UNFINISHED_ZSET_KEY = "c:t:z";       // contest:times:zset    member:竞赛id  score:时间戳

    String CONTEST_HISTORY_ZSET_KEY = "c:h:z";       // contest:history:zset    member:竞赛id  score:时间戳

    String CONTEST_DETAIL_KEY = "c:d:";     // contest:detail:竞赛id    value: 竞赛的基本信息

    String USER_CONTEST_LIST_KEY = "u:c:l:";    // user:contest:list:用户id  value: 竞赛id

    String USER_CONTEST_ZSET_KEY = "u:c:z:";    // user:contest:zset:用户id  member:竞赛id  score:时间戳

    String USER_DETAIL_KEY = "u:d:";        // user:detail:用户id       value: 用户详情

    String USER_UPLOAD_TIMES_KEY = "u:u:t:"; // user:upload:times:用户id  value:今日上传次数

    String QUESTION_LIST_KEY = "q:l";       // question:list   value: questionId

    String CONTEST_QUESTION_LIST_KEY = "c:q:l:";  // contest:question:list:竞赛id    value: 题目id

    String USER_MESSAGE_LIST_KEY = "u:m:l:";     // user:message:list:用户id         value: textId

    String MESSAGE_DETAIL_KEY = "m:d:";         // message:detail:消息id      value: 消息详情

    String CONTEST_RANK_LIST_KEY = "c:r:l:";     // contest:rank:list:竞赛id        value:排名详情

    String HOT_QUESTION_LIST_KEY = "h:q:l";     // hot:question:list        value: 题目id

    String USER_QUESTION_PASS_LIST_KEY = "u:q:p:l:";    // user:question:pass:list:用户id    value:题目id

    String USER_QUESTION_FAIL_LIST_KEY = "u:q:f:l:";    // user:question:fail:list:用户id    value:题目id
}
